package com.ymatou.iapi.productmanager.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.json.JSONArray;
import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;

public class ActivityProductSuspendSaleCall extends YmatouAutoTestCall{
	private static String opurl ="api/Product/ActivityProductSuspendSale";
	
	public ActivityProductSuspendSaleCall() {
		super(EnvSetup.getSystemUrl("productmanager"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public JSONObject call(int userId, int liveId,List<String> productIdList){
		Map<String, Object> updateMap = new HashMap<String, Object>();
		updateMap.put("UserId", userId);
		updateMap.put("ActivityId", liveId);
		updateMap.put("ProductIds", new JSONArray(productIdList));

		return callAndGetReturnData(updateMap);
	}
	
	
	public static void main(String[] args) {
		new ActivityProductSuspendSaleCall().callAndGetReturnData();
	}
}
